<?php


/**
 * +-------------------------------------------------------------
 * |Caption:
 * +-------------------------------------------------------------
 * |Author: Lenny
 * +-------------------------------------------------------------
 * |Email:  1685964109@qq.com
 * +-------------------------------------------------------------
 * |Date:   2024-03-12 09:42
 * +-------------------------------------------------------------
 */

use think\facade\Route;
use app\api\middleware\Token;

//登录
Route::group('login', function () {
    Route::post('login', 'login/login');//登录
});


//首页商品
Route::group('goods', function () {
    Route::post('list', 'Goods/list');//列表
    Route::post('cate', 'Search/cate');//列表
    Route::post('rule', 'Goods/rule');//多规格列表
})->middleware(Token::class);


//购物车
Route::group('cart', function () {
    Route::post('list', 'Cart/list');//列表
    Route::post('create', 'Cart/add');//添加/减少
})->middleware(Token::class);


//订单
Route::group('order', function () {
    Route::post('list', 'Order/list');//列表
    Route::post('create', 'Order/add');//添加
    Route::post('details', 'Order/detail');//明细
})->middleware(Token::class);

//我的
Route::group('my', function () {
    Route::post('list', 'My/list');//列表
})->middleware(Token::class);